#pragma once
#include "tinydbmanager.h"

#define DB_USERINFO  1
#define DB_USERGROUP_INFO 2

#include "ExtensionMapper.h"
#include "TrunkMapper.h"
#include "UserMapper.h"
#include "UserGroupMapper.h"
#include "VoiceCardMapper.h"
#include "FlowConfigMapper.h"

namespace DBLayer{

class CTinyCCDBMgr :
	public CTinyDBManager
{
public:
	CTinyCCDBMgr(void)
	{
	};
	~CTinyCCDBMgr(void);
	virtual void init(int dbtype, std::string & connstr);
	virtual bool ProcessReceivedMsg(CTinyMsg& inMsg, CTinyMsg& outMsg);
public:
	//mysql table interface
	CTrunkMapper* trunks;
	CExtensionMapper* extensions;
	CUserMapper* users;
	CVoiceCardMapper * cards;
	CFlowConfigMapper * flows;
};

}